home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!lll-winken!sun-barr!newstop!sun!bea.lbl.gov
- From: envbvs@bea.lbl.gov (Brian V. Smith)
- Newsgroups: comp.sources.x
- Subject: v10i031: xfig -- X Drawing Tool, Patch9, Part06/06
- Message-ID: <144204@sun.Eng.Sun.COM>
- Date: 25 Oct 90 18:07:05 GMT
- References: <csx-10i026:xfig2@uunet.UU.NET>
- Sender: news@sun.Eng.Sun.COM
- Lines: 1126
- Approved: argv@sun.com
-
- Submitted-by: envbvs@bea.lbl.gov (Brian V. Smith)
- Posting-number: Volume 10, Issue 31
- Archive-name: xfig2/patch9.06
- Patch-To: xfig2.8: Volume 8, Issue 10-30
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 6 (of 6)."
- # Contents: patch9.diff2
- # Wrapped by envbvs@bea.lbl.gov.lbl.gov on Wed Oct 17 10:24:45 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'patch9.diff2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patch9.diff2'\"
- else
- echo shar: Extracting \"'patch9.diff2'\" \(30432 characters\)
- sed "s/^X//" >'patch9.diff2' <<'END_OF_FILE'
- X*** main.c.p9 Mon Jun 25 11:24:36 1990
- X--- main.c Thu Sep 20 16:21:20 1990
- X***************
- X*** 30,35 ****
- X--- 30,38 ----
- X static char tool_name[100] = " FIG : FACILITY FOR INTERACTIVE GENERATION OF FIGURES ";
- X static sigwinched();
- X
- X+ char cut_buf_name[100];
- X+ char *getenv();
- X+
- X /************** FIG options ******************/
- X
- X extern appresStruct appres;
- X***************
- X*** 122,128 ****
- X printf("Initializing FIG v%s Protocol v%s (X11 patchlevel %d) ... \n",
- X FIG_VERSION, PROTOCOL_VERSION, PATCHLEVEL);
- X tool = XtInitialize("fig", "Fig", options, XtNumber(options),
- X! &argc, argv);
- X
- X fix_converters();
- X XtGetApplicationResources(tool, &appres, application_resources,
- X--- 125,131 ----
- X printf("Initializing FIG v%s Protocol v%s (X11 patchlevel %d) ... \n",
- X FIG_VERSION, PROTOCOL_VERSION, PATCHLEVEL);
- X tool = XtInitialize("fig", "Fig", options, XtNumber(options),
- X! (Cardinal *)&argc, argv);
- X
- X fix_converters();
- X XtGetApplicationResources(tool, &appres, application_resources,
- X***************
- X*** 302,307 ****
- X--- 305,311 ----
- X setup_fontmenu(); /* install bitmaps in printer font menu */
- X printer_select();
- X show_fontsize();
- X+ show_textstep();
- X show_line_thickness();
- X put_msg("READY");
- X canvas_rightbut_proc = set_popupmenu;
- X***************
- X*** 309,313 ****
- X--- 313,331 ----
- X edit_file(filename);
- X (void)signal(SIGINT, SIG_IGN); /* so we don't lose work accidentally */
- X
- X+ /* get a name for the cut buffer */
- X+ /* first try to create a file in the users HOME directory */
- X+ /* with a fixed name. This will allow cutting and pasting */
- X+ /* between sessions of the same user */
- X+ /* If the HOME directory cannot be found, then create a temporary */
- X+ /* file in the /tmp directory. This should have a unique name */
- X+ /* so that multiple users do not clash */
- X+ if(*strcpy(cut_buf_name,getenv("HOME")) != NULL) {
- X+ strcat(cut_buf_name, "/.xfig");
- X+ }
- X+ else {
- X+ sprintf(cut_buf_name, "%s%06d", "/tmp/xfig",getpid());
- X+ }
- X+
- X XtMainLoop();
- X }
- X*** panel.c.p9 Mon Jun 25 13:22:55 1990
- X--- panel.c Mon Aug 13 11:13:57 1990
- X***************
- X*** 24,29 ****
- X--- 24,30 ----
- X extern change_directory();
- X extern print_wdir();
- X extern print_figure();
- X+ extern finish_text_input();
- X extern int line_thickness;
- X extern int cur_radius;
- X extern int cur_areafill;
- X***************
- X*** 32,37 ****
- X--- 33,39 ----
- X extern char current_file[];
- X extern int print_landscape;
- X extern int size_button;
- X+ extern int step_button;
- X extern int type_button;
- X extern char *printer;
- X extern int cur_printer;
- X***************
- X*** 77,82 ****
- X--- 79,86 ----
- X static popup_fonts();
- X static inc_size_button();
- X static dec_size_button();
- X+ static inc_step_button();
- X+ static dec_step_button();
- X static land_button();
- X
- X static Pixmap Lp_pm; /* pixmaps for print-Landscape/Portrait button */
- X***************
- X*** 83,91 ****
- X--- 87,97 ----
- X static Pixmap lP_pm;
- X static Pixmap print_sel_pm; /* pixmap for printer selection widget */
- X static Pixmap font_size_pm; /* pixmap for printer selection widget */
- X+ static Pixmap font_step_pm; /* pixmap for text step widget */
- X static Pixmap text_just_pm[3]; /* pixmaps for left/center/right just widget */
- X static Widget print_sel_widget;
- X static Widget font_size_widget;
- X+ static Widget font_step_widget;
- X static F_switch *text_just_sw; /* text justification button */
- X static F_switch *land_port_sw; /* landscape/portrait button */
- X
- X***************
- X*** 177,182 ****
- X--- 183,189 ----
- X { 0, -1, 0, 0, &print_sel_ic, F_PRINTSEL, panel_button, null_proc, S_MOMENT,},
- X { 0, -1, 0, 0, &font_ic, F_FONT, popup_fonts, null_proc, S_MOMENT, },
- X { 0, -1, 0, 0, &size_ic, F_SIZE, dec_size_button, null_proc, S_MOMENT, },
- X+ { 0, -1, 0, 0, &step_ic, F_STEP, dec_step_button, null_proc, S_MOMENT, },
- X { 0, -1, 0, 0, &textL_ic, F_JUST, text_just_button, null_proc, S_MOMENT, },
- X { 0, -1, 0, 0, &land_ic, F_LAND, land_button, null_proc, S_MOMENT, },
- X { 0, -1, 0, 0, &undo_ic, F_UNDO, panel_button, null_proc, S_MOMENT, },
- X***************
- X*** 273,279 ****
- X static right_but();
- X
- X /* button selection event handler */
- X! static sel_but();
- X
- X int
- X init_panel(tool)
- X--- 280,286 ----
- X static right_but();
- X
- X /* button selection event handler */
- X! static void sel_but();
- X
- X int
- X init_panel(tool)
- X***************
- X*** 443,448 ****
- X--- 450,460 ----
- X font_size_pm = p;
- X font_size_widget = sw->but.widget;
- X }
- X+ else if (sw->value == F_STEP) /* save pointer for text step */
- X+ {
- X+ font_step_pm = p;
- X+ font_step_widget = sw->but.widget;
- X+ }
- X else if (sw->value == F_JUST) /* save ptr to pixmap/widget for text justification */
- X {
- X text_just_sw = sw;
- X***************
- X*** 489,495 ****
- X
- X /* come here when a button is pressed in either of the panels */
- X
- X! static
- X sel_but(widget, sw, event)
- X Widget widget;
- X F_switch *sw;
- X--- 501,507 ----
- X
- X /* come here when a button is pressed in either of the panels */
- X
- X! static void
- X sel_but(widget, sw, event)
- X Widget widget;
- X F_switch *sw;
- X***************
- X*** 522,527 ****
- X--- 534,543 ----
- X case F_SIZE:
- X inc_size_button(sw);
- X break;
- X+
- X+ case F_STEP:
- X+ inc_step_button(sw);
- X+ break;
- X }
- X }
- X
- X***************
- X*** 634,639 ****
- X--- 650,657 ----
- X extern int rotate_angle;
- X extern int flip_axis;
- X
- X+ if (cur_command == F_TEXT)
- X+ finish_text_input(); /* finish up any text input */
- X switch (sw->value) {
- X case F_CIRCLE_BY_RAD :
- X circlebyradius_drawing_selected();
- X***************
- X*** 1114,1120 ****
- X panel_button(sw)
- X F_switch *sw;
- X {
- X! char_handler(CR); /* finish any text in progress */
- X switch (sw->value) {
- X case F_UNDO :
- X undo();
- X--- 1132,1139 ----
- X panel_button(sw)
- X F_switch *sw;
- X {
- X! if (cur_command == F_TEXT)
- X! finish_text_input(); /* finish up any text input */
- X switch (sw->value) {
- X case F_UNDO :
- X undo();
- X***************
- X*** 1246,1252 ****
- X--- 1265,1295 ----
- X show_fontsize();
- X }
- X
- X+ static
- X+ inc_step_button(sw)
- X+ F_switch *sw;
- X+ {
- X+ if (step_button >= 100)
- X+ {
- X+ step_button = (step_button/10) * 10; /* round first */
- X+ step_button += 10;
- X+ }
- X+ else if (step_button >= 50)
- X+ {
- X+ step_button = (step_button/5) * 5;
- X+ step_button += 5;
- X+ }
- X+ else if (step_button >= 20)
- X+ {
- X+ step_button = (step_button/2) * 2;
- X+ step_button += 2;
- X+ }
- X+ else
- X+ step_button++;
- X+ show_textstep();
- X+ }
- X
- X+
- X /* decrease font size for print */
- X
- X static
- X***************
- X*** 1273,1278 ****
- X--- 1316,1346 ----
- X show_fontsize();
- X }
- X
- X+
- X+ static
- X+ dec_step_button(sw)
- X+ F_switch *sw;
- X+ {
- X+ if (step_button > 100)
- X+ {
- X+ step_button = (step_button/10) * 10; /* round first */
- X+ step_button -= 10;
- X+ }
- X+ else if (step_button > 50)
- X+ {
- X+ step_button = (step_button/5) * 5;
- X+ step_button -= 5;
- X+ }
- X+ else if (step_button > 20)
- X+ {
- X+ step_button = (step_button/2) * 2;
- X+ step_button -= 2;
- X+ }
- X+ else if (step_button > 4)
- X+ step_button--;
- X+ show_textstep();
- X+ }
- X+
- X static char tmpsiz[5];
- X
- X show_fontsize()
- X***************
- X*** 1296,1301 ****
- X--- 1364,1387 ----
- X XtSetValues(font_size_widget, &button_args[3], 1);
- X }
- X
- X+ /* could make this more generic - but a copy will do for font set JNT */
- X+ show_textstep()
- X+ {
- X+ put_msg("Font step %.1f",step_button / 10.0);
- X+ /* write the font size in the background pixmap */
- X+ tmpsiz[0]=tmpsiz[1]=tmpsiz[2]=tmpsiz[3]=tmpsiz[4]='\0';
- X+ sprintf(tmpsiz,"%3.1f",step_button / 10.0);
- X+ XDrawImageString(tool_d, font_step_pm, button_gc,
- X+ 31, 12, tmpsiz, strlen(tmpsiz));
- X+
- X+ button_args[3].value = 0;
- X+ XtSetValues(font_step_widget, &button_args[3], 1);
- X+
- X+ /* put the pixmap in the widget background */
- X+ button_args[3].value = font_step_pm;
- X+ XtSetValues(font_step_widget, &button_args[3], 1);
- X+ }
- X+
- X /* change landscape/portrait flag for print */
- X
- X static
- X***************
- X*** 1314,1337 ****
- X button_args[3].value = (XtArgVal) (print_landscape? Lp_pm: lP_pm);
- X XtSetValues(land_port_sw->but.widget, &button_args[3], 1);
- X put_msg("Print in %s mode",print_landscape? "LANDSCAPE": "PORTRAIT");
- X- }
- X-
- X- /* undo last operation */
- X-
- X- static
- X- undo_button(sw)
- X- F_switch *sw;
- X- {
- X- undo();
- X- }
- X-
- X- /* redisplay */
- X-
- X- static
- X- redisp_button(sw)
- X- F_switch *sw;
- X- {
- X- redisplay_canvas();
- X }
- X
- X turn_on(s)
- X--- 1400,1405 ----
- X*** panel2.h.p9 Mon Apr 9 09:39:37 1990
- X--- panel2.h Thu Aug 2 10:55:41 1990
- X***************
- X*** 211,216 ****
- X--- 211,236 ----
- X 0x00, 0x00, 0x00, 0x00};
- X mpr_static(size_ic,52,28,1,size_image);
- X
- X+ static char step_image[196] = {
- X+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X+ 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x02, 0x00,
- X+ 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40,
- X+ 0x8c, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x40, 0x12, 0x25, 0x00, 0x00, 0x00,
- X+ 0x00, 0x40, 0x1e, 0x22, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x22, 0x00,
- X+ 0x00, 0x00, 0x00, 0x40, 0x26, 0x25, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x9c,
- X+ 0xcd, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
- X+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
- X+ 0x00, 0x00, 0x70, 0x01, 0x00, 0x54, 0x00, 0x00, 0x00, 0x88, 0x01, 0x00,
- X+ 0x10, 0x00, 0x00, 0x00, 0x08, 0x09, 0x00, 0x10, 0x00, 0x00, 0x00, 0x30,
- X+ 0x3c, 0xf3, 0x10, 0x00, 0x00, 0x00, 0xe0, 0x88, 0x24, 0x11, 0x00, 0x00,
- X+ 0x00, 0x80, 0x89, 0x27, 0x11, 0x00, 0x00, 0x00, 0x08, 0x89, 0x20, 0x55,
- X+ 0x00, 0x00, 0x00, 0x98, 0x89, 0x29, 0x39, 0x00, 0x00, 0x00, 0xe8, 0x30,
- X+ 0xe7, 0x10, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
- X+ 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,
- X+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X+ 0x00, 0x00, 0x00, 0x00};
- X+ mpr_static(step_ic,52,28,1,step_image);
- X+
- X static char font_image[210] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff,
- X*** patchlevel.h.p9 Tue May 1 16:59:08 1990
- X--- patchlevel.h Fri Jun 29 09:14:55 1990
- X***************
- X*** 1 ****
- X! #define PATCHLEVEL 8
- X--- 1 ----
- X! #define PATCHLEVEL 9
- X*** popup.c.p9 Tue May 1 16:33:52 1990
- X--- popup.c Thu Sep 20 16:39:55 1990
- X***************
- X*** 14,32 ****
- X
- X /******************* imported global variables and procedures **************/
- X
- X! extern int figure_modified;
- X! extern char current_file[];
- X
- X! extern put_msg();
- X! extern init_msg_receiving();
- X! extern read_file();
- X! extern edit_file();
- X! extern change_directory();
- X! extern save_current_file();
- X! extern save_file();
- X! extern save_and_exit();
- X! extern write_bitmap();
- X! extern Reset_cursor();
- X
- X /******************** local variables ***************************/
- X
- X--- 14,36 ----
- X
- X /******************* imported global variables and procedures **************/
- X
- X! extern int figure_modified;
- X! extern char current_file[];
- X! extern int cur_command;
- X! extern char cut_buf_name[];
- X
- X! extern put_msg();
- X! extern init_msg_receiving();
- X! extern read_file();
- X! extern edit_file();
- X! extern change_directory();
- X! extern save_current_file();
- X! extern save_file();
- X! extern save_and_exit();
- X! extern write_bitmap();
- X! extern Reset_cursor();
- X! extern file_cut_selected();
- X! extern finish_text_input();
- X
- X /******************** local variables ***************************/
- X
- X***************
- X*** 35,40 ****
- X--- 39,46 ----
- X {MENU_IMAGESTRING, "Undo", (caddr_t) F_UNDO},
- X {MENU_IMAGESTRING, "Redisplay", (caddr_t) F_REDISPLAY},
- X {MENU_IMAGESTRING, "Remove all", (caddr_t) F_REMOVE_ALL},
- X+ {MENU_IMAGESTRING, "Cut", (caddr_t) F_CUT},
- X+ {MENU_IMAGESTRING, "Paste", (caddr_t) F_PASTE},
- X {MENU_IMAGESTRING, "Edit file ...", (caddr_t) F_EDIT},
- X {MENU_IMAGESTRING, "Save", (caddr_t) F_SAVE},
- X {MENU_IMAGESTRING, "Read file ...", (caddr_t) F_READ},
- X***************
- X*** 165,176 ****
- X {
- X int menu_code = (int)mi->info;
- X
- X! char_handler(CR);
- X
- X switch(menu_code) {
- X case F_UNDO :
- X undo();
- X break;
- X case F_READ :
- X init_msg_receiving(read_file, "Read file : ");
- X break;
- X--- 171,191 ----
- X {
- X int menu_code = (int)mi->info;
- X
- X! if (cur_command == F_TEXT)
- X! finish_text_input();
- X! /* char_handler(CR); */ /* old method */
- X
- X switch(menu_code) {
- X case F_UNDO :
- X undo();
- X break;
- X+ case F_CUT:
- X+ put_msg("Select object to cut into cut-file");
- X+ file_cut_selected();
- X+ break;
- X+ case F_PASTE:
- X+ read_file(cut_buf_name);
- X+ break;
- X case F_READ :
- X init_msg_receiving(read_file, "Read file : ");
- X break;
- X***************
- X*** 221,232 ****
- X init_msg_receiving(write_bitmap, "Save bitmap to file : ");
- X break;
- X }
- X! Reset_cursor();
- X XtPopdown(menu);
- X }
- X
- X quit()
- X {
- X if (no_object()) {
- X tool_destroy(tool);
- X exit(0);
- X--- 236,251 ----
- X init_msg_receiving(write_bitmap, "Save bitmap to file : ");
- X break;
- X }
- X! reset_cursor();
- X XtPopdown(menu);
- X }
- X
- X quit()
- X {
- X+ /* delete the cut buffer only if it is a temporary file */
- X+ if(strncmp(cut_buf_name, "/tmp",4) == 0)
- X+ unlink(cut_buf_name);
- X+
- X if (no_object()) {
- X tool_destroy(tool);
- X exit(0);
- X*** print.c.p9 Mon Apr 16 11:22:34 1990
- X--- print.c Tue Sep 25 15:58:40 1990
- X***************
- X*** 25,88 ****
- X static char prcmd[200];
- X static char *conf_prnt =
- X "Figure hasn't been saved, PRINT with LEFT button, CANCEL with MIDDLE or RIGHT";
- X
- X print_figure()
- X! {
- X! int print_to_specified_printer();
- X! int print_to_file();
- X! if (current_file[0]==0) {
- X put_msg("NO FILE TO PRINT");
- X XBell(tool_d,50);
- X! }
- X! else {
- X if (figure_modified) /* modified without saving, confirm print */
- X if (wmgr_confirm(canvas_win, conf_prnt) != -1)
- X return;
- X
- X! if (! strcmp("Default", printer)) {
- X! put_msg("Print figure %s on printer %s in %s mode",
- X current_file,printer,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! sprintf(prcmd,"f2ps -c %s %s | lpr -J %s",
- X! print_landscape? "-L":"-P",
- X! current_file,
- X! current_file);
- X! }
- X else if (! strcmp("File", printer))
- X init_msg_receiving(print_to_file, "Output file : ");
- X else if (! strcmp("Specify", printer))
- X init_msg_receiving(print_to_specified_printer, "Printer : ");
- X! else { /* default */
- X! put_msg("Print figure %s on printer %s in %s mode",
- X! current_file,printer,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! sprintf(prcmd,"f2ps -c %s %s | lpr -J %s -P%s",
- X! print_landscape? "-L":"-P",
- X! current_file,
- X! current_file,
- X! printer);
- X! }
- X if (system(prcmd)==127)
- X put_msg("Error in printing");
- X }
- X- }
- X
- X print_to_file(file)
- X char *file;
- X! {
- X if (*file == 0) {
- X put_msg("Empty name");
- X return;
- X }
- X sprintf(prcmd,"f2ps -c %s %s > %s",
- X print_landscape? "-L":"-P",
- X current_file,
- X file);
- X put_msg("Print figure %s to file %s in %s mode",
- X current_file,file,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! }
- X
- X print_to_specified_printer(specified_printer)
- X char *specified_printer;
- X! {
- X if (*specified_printer == 0) {
- X put_msg("Empty name");
- X return;
- X--- 25,119 ----
- X static char prcmd[200];
- X static char *conf_prnt =
- X "Figure hasn't been saved, PRINT with LEFT button, CANCEL with MIDDLE or RIGHT";
- X+ static char translator[40],
- X+ syspr[40];
- X
- X print_figure()
- X! {
- X! int print_to_specified_printer();
- X! int print_to_file();
- X!
- X! if (current_file[0]==0)
- X! {
- X put_msg("NO FILE TO PRINT");
- X XBell(tool_d,50);
- X! }
- X! else
- X! {
- X if (figure_modified) /* modified without saving, confirm print */
- X if (wmgr_confirm(canvas_win, conf_prnt) != -1)
- X return;
- X
- X! if (! strcmp("Default", printer))
- X! {
- X! put_msg("Print figure %s on printer %s in %s mode",
- X current_file,printer,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! #ifndef TFX
- X! strcpy(translator,"f2ps -c ");
- X! strcat(translator,print_landscape? "-L":"-P");
- X! #else
- X! strcpy(translator,"fig2dev -Lps -P ");
- X! strcat(translator,print_landscape? "-l xxx":" ");
- X! #endif
- X! #ifdef SYSV
- X! sprintf(syspr,"lp -oPS");
- X! #else
- X! sprintf(syspr,"lpr -J %s", current_file);
- X! #endif
- X! /* lastly, make up the whole translate/print command */
- X! sprintf(prcmd,"%s %s | %s",translator,current_file,syspr);
- X! }
- X else if (! strcmp("File", printer))
- X init_msg_receiving(print_to_file, "Output file : ");
- X else if (! strcmp("Specify", printer))
- X init_msg_receiving(print_to_specified_printer, "Printer : ");
- X! else
- X! { /* default */
- X! put_msg("Print figure %s on printer %s in %s mode",
- X! current_file,printer,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! #ifndef TFX
- X! strcpy(translator,"f2ps -c ");
- X! strcat(translator,print_landscape? "-L":"-P");
- X! #else
- X! strcpy(translator,"fig2dev -Lps -P ");
- X! strcat(translator,print_landscape? "-l xxx":" ");
- X! #endif
- X! #ifdef SYSV
- X! sprintf(syspr,"lp -d%s -oPS",printer);
- X! #else
- X! sprintf(syspr,"lpr -J %s -P%s", current_file, printer);
- X! #endif
- X! /* lastly, make up the whole translate/print command */
- X! sprintf(prcmd,"%s %s | %s",translator,current_file,syspr);
- X! }
- X if (system(prcmd)==127)
- X put_msg("Error in printing");
- X+ }
- X }
- X
- X print_to_file(file)
- X char *file;
- X! {
- X if (*file == 0) {
- X put_msg("Empty name");
- X return;
- X }
- X+ #ifndef TFX
- X sprintf(prcmd,"f2ps -c %s %s > %s",
- X print_landscape? "-L":"-P",
- X+ #else
- X+ sprintf(prcmd,"fig2dev -Lps -P %s %s %s",
- X+ print_landscape? "-l xxx":" ",
- X+ #endif
- X current_file,
- X file);
- X put_msg("Print figure %s to file %s in %s mode",
- X current_file,file,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! }
- X
- X print_to_specified_printer(specified_printer)
- X char *specified_printer;
- X! {
- X if (*specified_printer == 0) {
- X put_msg("Empty name");
- X return;
- X***************
- X*** 89,97 ****
- X }
- X put_msg("Print figure %s on printer %s in %s mode",
- X current_file,specified_printer,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! sprintf(prcmd,"f2ps -c %s %s | lpr -J %s -P%s",
- X! print_landscape? "-L":"-P",
- X! current_file,
- X! current_file,
- X! specified_printer);
- X! }
- X--- 120,136 ----
- X }
- X put_msg("Print figure %s on printer %s in %s mode",
- X current_file,specified_printer,print_landscape? "LANDSCAPE":"PORTRAIT");
- X! #ifndef TFX
- X! strcpy(translator,"f2ps -c ");
- X! strcat(translator,print_landscape? "-L":"-P");
- X! #else
- X! strcpy(translator,"fig2dev -Lps -P ");
- X! strcat(translator,print_landscape? "-l xxx":" ");
- X! #endif
- X! #ifdef SYSV
- X! sprintf(syspr,"lp -d%s -oPS",specified_printer);
- X! #else
- X! sprintf(syspr,"lpr -J %s -P%s", current_file, specified_printer);
- X! #endif
- X! sprintf(prcmd,"%s %s | %s",translator,current_file,syspr);
- X! }
- X*** read.c.p9 Mon Jun 25 11:25:28 1990
- X--- read.c Fri Jul 6 10:48:42 1990
- X***************
- X*** 97,103 ****
- X--- 97,107 ----
- X float fproto;
- X
- X num_object = 0;
- X+ #ifdef SYSV
- X+ memset((char*)obj, 0, COMOBJ_SIZE);
- X+ #else
- X bzero((char*)obj, COMOBJ_SIZE);
- X+ #endif
- X if (fgets(buf,BUF_SIZE,fp)==0) /* version */
- X return -2;
- X if (strncmp(buf,"#FIG",4)==0) /* versions 1.4/later have #FIG in first line */
- X***************
- X*** 450,457 ****
- X #else
- X if ((proto==14 && n != 10) ||
- X (proto==20 && (l->type == T_ARC_BOX && n != 11) ||
- X! (l->type != T_ARC_BOX && n != 10))) {
- X #endif TFX
- X put_msg(Err_incomp, "line", line_no);
- X free((char*)l);
- X return(NULL);
- X--- 454,462 ----
- X #else
- X if ((proto==14 && n != 10) ||
- X (proto==20 && (l->type == T_ARC_BOX && n != 11) ||
- X! (l->type != T_ARC_BOX && n != 10)))
- X #endif TFX
- X+ {
- X put_msg(Err_incomp, "line", line_no);
- X free((char*)l);
- X return(NULL);
- X***************
- X*** 675,681 ****
- X if (n == 13) {
- X /* Read in the remainder of the text object. */
- X do {
- X! fgets(buf, BUF_SIZE, fp);
- X line_no++; /* As is done in get_line */
- X n = sscanf(buf,"%[^\1]%[\1]", s_temp, junk);
- X /* Safety check */
- X--- 680,687 ----
- X if (n == 13) {
- X /* Read in the remainder of the text object. */
- X do {
- X! /*khc 06JUL90 - test for end-of-file or else hangs in loop if no ^A is found */
- X! if(fgets(buf, BUF_SIZE, fp) == NULL)break;
- X line_no++; /* As is done in get_line */
- X n = sscanf(buf,"%[^\1]%[\1]", s_temp, junk);
- X /* Safety check */
- X*** ruler.c.p9 Mon Apr 16 11:36:36 1990
- X--- ruler.c Thu Jul 5 13:42:49 1990
- X***************
- X*** 261,267 ****
- X fg, and bg when XOR'ed with bg.
- X */
- X XSetForeground(tool_d, gc, fg ^ bg);
- X! XSetBackground(tool_d, gc, 0);
- X
- X /* make pixmaps for top ruler arrow */
- X toparrow_pm = XCreatePixmap(tool_d, topruler_win, trm_pr.width,
- X--- 261,267 ----
- X fg, and bg when XOR'ed with bg.
- X */
- X XSetForeground(tool_d, gc, fg ^ bg);
- X! XSetBackground(tool_d, gc, (unsigned long) 0);
- X
- X /* make pixmaps for top ruler arrow */
- X toparrow_pm = XCreatePixmap(tool_d, topruler_win, trm_pr.width,
- X***************
- X*** 380,386 ****
- X
- X /* Colors set as above */
- X XSetForeground(tool_d, gc, fg ^ bg);
- X! XSetBackground(tool_d, gc, 0);
- X
- X /* make pixmaps for side ruler arrow */
- X if( appres.RHS_PANEL )
- X--- 380,386 ----
- X
- X /* Colors set as above */
- X XSetForeground(tool_d, gc, fg ^ bg);
- X! XSetBackground(tool_d, gc, (unsigned long) 0);
- X
- X /* make pixmaps for side ruler arrow */
- X if( appres.RHS_PANEL )
- X*** spline.c.p9 Tue May 1 16:40:18 1990
- X--- spline.c Thu Jul 5 13:23:57 1990
- X***************
- X*** 82,88 ****
- X }
- X if (NULL == (Spline_malloc(spline))) {
- X put_msg(Err_mem);
- X! return(NULL);
- X }
- X spline->style = line_style;
- X spline->thickness = line_thickness;
- X--- 82,88 ----
- X }
- X if (NULL == (Spline_malloc(spline))) {
- X put_msg(Err_mem);
- X! return;
- X }
- X spline->style = line_style;
- X spline->thickness = line_thickness;
- X*** text.c.p9 Tue May 1 16:40:18 1990
- X--- text.c Wed Aug 1 15:56:29 1990
- X***************
- X*** 30,35 ****
- X--- 30,36 ----
- X
- X extern int font_button, size_button;
- X extern int type_button;
- X+ extern int step_button;
- X
- X extern int cur_font, cur_fontsize;
- X extern char_handler();
- X***************
- X*** 45,56 ****
- X
- X static int char_ht, char_wid;
- X static int base_x, base_y;
- X static F_text *cur_text;
- X static PR_SIZE tsize;
- X static PR_SIZE ssize;
- X
- X F_text *create_text();
- X! static finish_text_input();
- X static finish_n_start();
- X static init_text_input();
- X static wrap_up();
- X--- 46,58 ----
- X
- X static int char_ht, char_wid;
- X static int base_x, base_y;
- X+
- X static F_text *cur_text;
- X static PR_SIZE tsize;
- X static PR_SIZE ssize;
- X
- X F_text *create_text();
- X! extern finish_text_input();
- X static finish_n_start();
- X static init_text_input();
- X static wrap_up();
- X***************
- X*** 62,68 ****
- X init_text_input(x, y);
- X }
- X
- X- static
- X finish_text_input()
- X {
- X wrap_up();
- X--- 64,69 ----
- X***************
- X*** 69,74 ****
- X--- 70,83 ----
- X text_drawing_selected();
- X }
- X
- X+ new_text_line()
- X+ {
- X+ wrap_up();
- X+ cur_y += (int) ((float) char_ht * step_button / 10.0);
- X+ cur_x = base_x;
- X+ init_text_input(cur_x, cur_y);
- X+ }
- X+
- X static
- X wrap_up()
- X {
- X***************
- X*** 117,124 ****
- X init_text_input(x, y)
- X int x, y;
- X {
- X! int basx;
- X!
- X cur_x = x;
- X cur_y = y;
- X
- X--- 126,132 ----
- X init_text_input(x, y)
- X int x, y;
- X {
- X! int basx;
- X cur_x = x;
- X cur_y = y;
- X
- X*** troff_fonts.c.p9 Mon May 7 13:31:22 1990
- X--- troff_fonts.c Thu Jul 5 10:05:17 1990
- X***************
- X*** 17,24 ****
- X
- X troff_init()
- X {
- X! FILE *fp,
- X! *fopen();
- X char fname[128],
- X line[128],
- X *p,
- X--- 17,23 ----
- X
- X troff_init()
- X {
- X! FILE *fp;
- X char fname[128],
- X line[128],
- X *p,
- X*** xfig.man.p9 Tue Apr 24 11:24:00 1990
- X--- xfig.man Fri Sep 21 14:36:17 1990
- X***************
- X*** 1,23 ****
- X! .TH XFIG 1 "Release 2.0 (Protocol 1.4X)"
- X .SH NAME
- X xfig \- Facility for Interactive Generation of figures under X11
- X .SH SYNOPSIS
- X .B xfig
- X! [ \fB-ri[ght]\fP ]
- X! [ \fB-le[ft]\fP ]
- X! [ \fB-L[andscape]\fP ]
- X! [ \fB-P[ortrait]\fP ]
- X! [ \fB-pw[idth]\fP \fIunits\fP ]
- X! [ \fB-ph[eight]\fP \fIunits\fP ]
- X! [ \fB-not[rack]\fP ]
- X! [ \fB-tr[ack]\fP ]
- X! [ \fB-inc[hes]\fP ]
- X! [ \fB-me[tric]\fP ]
- X! [ \fB-inv[erse]\fP ]
- X! [ \fB-de[bug]\fP ]
- X! [ \fIfile\fP ]
- X! [ \fB-normal[Font]\fP \fIfont\fP ]
- X! [ \fB-bold[Font]\fP \fIfont\fP ]
- X .SH DESCRIPTION
- X .I Xfig
- X is a menu-driven tool that allows the user to draw and manipulate objects
- X--- 1,23 ----
- X! .TH XFIG 1 "Release 2.0, pl9 (Protocol 2.0)"
- X .SH NAME
- X xfig \- Facility for Interactive Generation of figures under X11
- X .SH SYNOPSIS
- X .B xfig
- X! [\fB-ri[ght]\fP]
- X! [\fB-le[ft]\fP]
- X! [\fB-L[andscape]\fP]
- X! [\fB-P[ortrait]\fP]
- X! [\fB-pw[idth]\fP \fIunits\fP]
- X! [\fB-ph[eight]\fP \fIunits\fP]
- X! [\fB-not[rack]\fP]
- X! [\fB-tr[ack]\fP]
- X! [\fB-inc[hes]\fP]
- X! [\fB-me[tric]\fP]
- X! [\fB-inv[erse]\fP]
- X! [\fB-de[bug]\fP]
- X! [\fIfile\fP]
- X! [\fB-normal[Font]\fP \fIfont\fP]
- X! [\fB-bold[Font]\fP \fIfont\fP]
- X .SH DESCRIPTION
- X .I Xfig
- X is a menu-driven tool that allows the user to draw and manipulate objects
- X***************
- X*** 165,170 ****
- X--- 165,174 ----
- X Most of the functions in the pop-up menu can be directly access with
- X the lower button panel.
- X .TP
- X+ .I Quit
- X+ Exit from \fIxfig\fP, discarding the figure. The user will be asked to
- X+ confirm the action, by clicking the left button.
- X+ .TP
- X .I Undo
- X Undo the last object creation or modification.
- X .TP
- X***************
- X*** 174,179 ****
- X--- 178,195 ----
- X .I Remove all
- X Remove all objects on the canvas window (can be undone).
- X .TP
- X+ .I Cut
- X+ Select object to copy into the cut/paste file. This file is called \f3.xfig\f1
- X+ in the user's \f3$HOME\f1 directory. This allows a user to run two or more
- X+ xfig processes and cut/paste objects between them.
- X+ If there is no \f3$HOME\f1, a file is
- X+ created in \f3/tmp\f1, called \f3xfig\f2PID\f1 where \f2PID\f1 is the
- X+ xfig process ID.
- X+ .TP
- X+ .I Paste
- X+ Paste the object previously copied into the cut/paste file into the current
- X+ figure.
- X+ .TP
- X .I Edit file ...
- X The current contents of the canvas are cleared and the figure
- X is read from the specified file.
- X***************
- X*** 203,208 ****
- X--- 219,227 ----
- X Change the working directory. Any file name without a full path name
- X will employ the current working directory.
- X .TP
- X+ .I Print Working Directory
- X+ Show the current working directory.
- X+ .TP
- X .I Save & Quit
- X Save the figure in the current file and exit from \fIxfig\fP.
- X If there is no current file, the user will be asked for a file name.
- X***************
- X*** 211,224 ****
- X .I Save as Bitmap
- X Create an X11 bitmap from the figure the size of which is determined
- X by the enclosing rectangle of all the figure plus a small border.
- X- .TP
- X- .I Quit
- X- Exit from \fIxfig\fP, discarding the figure. The user will be asked to
- X- confirm the action, by clicking the left button.
- X .SH "BOTTOM PANEL COMMAND FUNCTIONS"
- X! Most of the buttons in the bottom panel are counterparts to the pop-up menu functions.
- X! However, there are additional buttons for selecting font, font size, print orientation
- X! (landscape or portrait) and the printer device itself.
- X .SH "BOTTOM PANEL WINDOW COMMAND DESCRIPTIONS"
- X .TP
- X .I FONT SELECT
- X--- 230,240 ----
- X .I Save as Bitmap
- X Create an X11 bitmap from the figure the size of which is determined
- X by the enclosing rectangle of all the figure plus a small border.
- X .SH "BOTTOM PANEL COMMAND FUNCTIONS"
- X! Most of the buttons in the bottom panel are counterparts to the pop-up menu
- X! functions. However, there are additional buttons for selecting font, font
- X! size, text line step, print orientation (landscape or portrait) and the
- X! printer device itself.
- X .SH "BOTTOM PANEL WINDOW COMMAND DESCRIPTIONS"
- X .TP
- X .I FONT SELECT
- X***************
- X*** 238,243 ****
- X--- 254,264 ----
- X The left button decreases the point size of font used on the canvas and printer.
- X The right button increases the point size.
- X .TP
- X+ .I FONT STEP
- X+ The left button decreases the interline spacing of text and the right button
- X+ increases the step. The number displayed give the multiple of the font height
- X+ that will be placed between lines on hitting return.
- X+ .TP
- X .I LANDSCAPE/PORTRAIT
- X Select landscape or portrait mode of printing.
- X The default setting is that of the \fIxfig\fP canvas.
- X***************
- X*** 430,438 ****
- X Text is drawn using the current font, font size and justification settings.
- X A DEL or ^H (backspace) will delete a character, while a ^U will kill
- X the entire line.
- X! Terminate by clicking the middle button or typing the return key. To
- X! edit text, click on an existing text string with the left button.
- X! Insertion of characters will take place at that point.
- X .TP
- X .I TURN
- X Turn \fIPOLYGON\fP into a \fICLOSED INTERPOLATED SPLINE\fP object, or
- X--- 451,464 ----
- X Text is drawn using the current font, font size and justification settings.
- X A DEL or ^H (backspace) will delete a character, while a ^U will kill
- X the entire line.
- X! Terminate by clicking the middle button or typing the return key.
- X! If return is used, the text pointer automatically moves to the next "line",
- X! a distance of the font height times the value in the TEXT STEP button,
- X! and text input mode is re-entered. To terminate text fully, click the middle
- X! button or choose any panel button that changes modes (e.g. box, save, etc).
- X! To edit text, click on an existing text string with the left button.
- X! Insertion of characters will take place at that point. Or, use the popup
- X! change object button to modify the text.
- X .TP
- X .I TURN
- X Turn \fIPOLYGON\fP into a \fICLOSED INTERPOLATED SPLINE\fP object, or
- X***************
- X*** 581,586 ****
- X--- 607,614 ----
- X .PP
- X Undoing the creation of a compound object deletes the objects
- X outside the compound object. Undoing the undo doesn't bring them back.
- X+ .PP
- X+ Undoing a move-point of a box or arc-box will corrupt the object.
- X .PP
- X Ellipses which are too narrow are not drawn correctly.
- X .SH "SEE ALSO"
- END_OF_FILE
- if test 30432 -ne `wc -c <'patch9.diff2'`; then
- echo shar: \"'patch9.diff2'\" unpacked with wrong size!
- fi
- # end of 'patch9.diff2'
- fi
- echo shar: End of archive 6 \(of 6\).
- cp /dev/null ark6isdone
- MISSING=""
- for I in 1 2 3 4 5 6 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 6 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- dan
- ----------------------------------------------------
- O'Reilly && Associates argv@sun.com / argv@ora.com
- Opinions expressed reflect those of the author only.
-